<template>
	<view class="ceng oh">
		<view class="bjt">
			<image src="/static/img/common/my_bj.png"></image>
		</view>
		<view class="yyy">
			<view class="yyy1 tc">
				我的
			</view>
			<view class="yyy2 tc">
				<view class="yyy21">
					<image src="/static/img/common/my1.png"></image>
				</view>
				<view class="yyy22 oh">
					点击显示微信头像
				</view>
				<view class="yyy23 oh">
					<view class="yyy231 le">
						<u-icon name="edit-pen" color="#fff" size="23"></u-icon>
					</view>
					<view class="yyy232 le">编辑</view>
				</view>
			</view>
			<view class="yyy3 oh">
				<view class="yyy31 le">
					<view class="yyy311">
						<image src="/static/img/common/my2.png"></image>
					</view>
					<view class="yyy312">
						销售订单
					</view>
				</view>
				
				<view class="yyy31 le">
					<view class="yyy311">
						<image src="/static/img/common/my2.png"></image>
					</view>
					<view class="yyy312">
						取酒订单
					</view>
				</view>
				
				<view class="yyy31 le">
					<view class="yyy311">
						<image src="/static/img/common/my2.png"></image>
					</view>
					<view class="yyy312">
						保管费账单
					</view>
				</view>
			</view>
			<view class="yyy4 oh">
				<view class="yyy41">我的服务</view>
				<view class="ceng1 oh">
					<view class="yyy42 le">
						<view class="yyy421">
							<image src="/static/img/common/my_1.png"></image>
						</view>
						<view class="yyy422">
							我的藏酒
						</view>
					</view>
					
					<view class="yyy42 le">
						<view class="yyy421">
							<image src="/static/img/common/my_1.png"></image>
						</view>
						<view class="yyy422">
							取酒记录
						</view>
					</view>
					
					<view class="yyy42 le">
						<view class="yyy421">
							<image src="/static/img/common/my_1.png"></image>
						</view>
						<view class="yyy422">
							我的证书
						</view>
					</view>
					
					<view class="yyy42 le" @click="address">
						<view class="yyy421">
							<image src="/static/img/common/my_1.png"></image>
						</view>
						<view class="yyy422">
							地址管理
						</view>
					</view>
				</view>
			</view>
		</view>
	</view> 
</template>
<script>
	export default {
		data() {
			return {
				showCategoryIndex: 0,
				headerPosition: 'fixed',
				categoryList: []
			};
		},
		onPageScroll(e) {
			//兼容iOS端下拉时顶部漂移
			if (e.scrollTop >= 0) {
				this.headerPosition = 'fixed';
			} else {
				this.headerPosition = 'absolute';
			}
		},
		onLoad() {
			// this.$queue.showLoading('加载中...');
			// this.$Request.getT('/goodsType/list').then(res => {
			// 	if (res.status === 0) {
			// 		this.categoryList = [];
			// 		res.data.forEach(d => {
			// 			this.categoryList.push(d);
			// 		});
			// 	}
			// 	uni.hideLoading();
			// });
		},
		methods: {
			/**
			 * 统一跳转接口,拦截未登录路由
			 * navigator标签现在默认没有转场动画，所以用view
			 */
			navToLogin(url) {
				return
				let token = this.$queue.getData('token');
				let mobile = this.$queue.getData('mobile');
				let userId = this.$queue.getData('userId');
				if (token) {
					// #ifdef MP-WEIXIN
					if (uni.getStorageSync('sendindexMsg')) {
						uni.requestSubscribeMessage({
							tmplIds: this.arr,
							success(re) {
								// console.log(re,'**********')
								var datas = JSON.stringify(re);
								if (datas.indexOf("accept") != -1) {
									console.log(re)
								}
							},
							fail: (res) => {
								console.log(res)
							}
						})
					}
					// #endif
					this.$Request.getT('/user/' + userId).then(res => {
						if (res.status === 0 && res.data.phone) {
							uni.navigateTo({
								url
							});
						} else {
							uni.navigateTo({
								url: '/pages/public/mobile'
							});
						}
					});
				} else {
					this.goLoginInfo();
				}
			},
			//统一登录跳转
			goLoginInfo() {
				uni.navigateTo({
					url: '/pages/member/register'
				});
			},
			//分类切换显示
			showCategory(index) {
				this.showCategoryIndex = index;
			},
			toCategory(id, name) {
				uni.navigateTo({
					url: '/pages/categray/search?cid=' + id + '&name=' + name
				});
			},
			goSearch() {
				uni.navigateTo({
					url: '/package/pages/homeSearch/index'
				});
			},
			address() {
				uni.navigateTo({
					url: '/pages/member/address/address'
				});
			},
			
		}
	};
</script>
<style lang="scss">
	.content-div {
		width: 100%;
		display: flex;
		justify-content: space-around;
		z-index: 999;
		height: 104upx;
		/* #ifdef APP-PLUS */
		height: 110upx;
		// margin-top: -20rpx;
		// padding-top: 70rpx;
		/* #endif */
	}
	.ceng{
		height: 100vh;
		width: 100vw;
		.bjt{
			image{
				height: 700rpx;
		width: 100vw;
			}
		}
		.yyy{
			position: relative;
			top: -20vh;
			top: -700rpx;
			margin-top: 114rpx;
			.yyy1{
				font-family: Source Han Sans, Source Han Sans;
				font-weight: 700;
				font-size: 32rpx;
				color: #FFFFFF;
				line-height: 32rpx;
				
			}
			.yyy2{
				.yyy21{
					margin-top: 62rpx;
					    margin-bottom: 32rpx;
					image{
						height: 144rpx;
						width: 144rpx;
					}
				}
				.yyy22{
					width: 228rpx;
					height: 54rpx;
					background: linear-gradient( 270deg, #FFEFCA 0%, #F6CC92 100%);
					border-radius: 1578rpx 1578rpx 1578rpx 1578rpx;
					
					
					font-family: HarmonyOS Sans SC, HarmonyOS Sans SC;
					font-weight: 500;
					font-size: 24rpx;
					color: #955E11;
					line-height: 54rpx;
					margin: 0 266rpx;
				}
				.yyy23{
					    margin: 0 316rpx;
					    margin-top: 22rpx;
					.yyy232{
						
						font-family: HarmonyOS Sans SC, HarmonyOS Sans SC;
						font-weight: 500;
						font-size: 24rpx;
						color: #FFFFFF;
						line-height: 43rpx;

					}
				}
			}
			.yyy3{
				margin: 0 32rpx;
				width: 686rpx;
				height: 250rpx;
				background: #FFFFFF;
				border-radius: 16rpx 16rpx 16rpx 16rpx;
				    margin-top: 68rpx;
					margin-bottom: 24rpx;
				.yyy31{
					width: 33.3%;
					    text-align: center;
					    margin-top: 52rpx;
					.yyy311{
						image{
							height: 96rpx;
							width: 96rpx;
						}
					}
					.yyy312{
						
						font-family: HarmonyOS Sans SC, HarmonyOS Sans SC;
						font-weight: 500;
						font-size: 24rpx;
						color: #838BA5;
						margin-top: 7rpx;
					}
				}
			}
			.yyy4{
				width: 686rpx;
				height: 302rpx;
				background: #FFFFFF;
				border-radius: 16rpx 16rpx 16rpx 16rpx;
				margin: 0 32rpx;
				.yyy41{
					padding: 32rpx;
					font-family: Source Han Serif CN, Source Han Serif CN;
					font-weight: 700;
					font-size: 32rpx;
					color: #041133;
					line-height: 46rpx;
				}
				.yyy42{
					    width: 25%;
					    text-align: center;
					    margin-top: 11rpx;
					.yyy421{
						image{
							height: 80rpx;
							width: 80rpx;
						}
					}
					.yyy422{
						
						font-family: HarmonyOS Sans SC, HarmonyOS Sans SC;
						font-weight: 400;
						font-size: 24rpx;
						color: #838BA5;
						
					}
				}
			}

		}
	}

	.icon-headerI {
		font-size: 24rpx;
		color: #999999;
	}

	.icon_header {
		width: 590rpx;
		display: flex;
		height: 72upx;
		align-items: center;
		line-height: 40upx;
		padding: 10upx 20upx;
		background-color: #F0F1F5;
		border-radius: 10upx;
		margin-top: 14upx;
		margin-left: 18rpx;
	}

	.header-imgsuo {
		width: 37rpx;
		height: 35rpx;
		margin-right: 10upx;
		align-items: center;
		display: block;
	}

	.status {
		width: 100%;
		height: 0;
		position: fixed;
		z-index: 10;
		background-color: #fff;
		top: 0;
		/*  #ifdef  APP-PLUS  */
		height: var(--status-bar-height); //覆盖样式
		/*  #endif  */
	}

	.category-list {
		width: 100%;
		// margin-top: 20upx;
		display: flex;
		/* #ifndef H5 */
		position: fixed;
		top: 120rpx;
		/* #endif */
		/* #ifdef H5 */
		position: fixed;
		top: 200rpx;
		/* #endif */

		.left,
		.right {
			top: 88upx;
			bottom: 0upx;
		}

		.left {
			position: fixed;
			width: 24%;
			/* #ifndef H5 */
			top: 105rpx;
			/* #endif */
			/* #ifdef H5 */
			top: 180upx;
			/* #endif */
			left: 0upx;
			background-color: #FFFFFF;

			.row {
				width: 100%;
				height: 90upx;
				display: flex;
				align-items: center;

				.text {
					width: 100%;
					position: relative;
					font-size: 28upx;
					display: flex;
					justify-content: center;
					color: #333333;
					text-overflow: ellipsis;
					overflow: hidden;
					white-space: nowrap;

					.block {
						position: absolute;
						width: 0upx;
						left: 0;
					}
				}

				&.on {
					height: 100upx;
					// background-color: #F2F2F2;

					.text {
						font-size: 28rpx;
						font-weight: 600;
						color: #ffffff;
						background: #FF3333;
						border-radius: 45rpx;
						padding: 15rpx 0rpx;
						margin: 0rpx 10rpx;

						.block {
							width: 8upx;
							height: 100upx;
							top: -72%;
						}
					}
				}
			}
		}

		.right {
			margin-left: 27%;
			width: 70%;
			left: 24%;
			background-color: #FFFFFF;
			border-radius: 30upx;

			.category {
				width: 94%;
				padding: 20upx 3%;

				.banner {
					width: 100%;
					height: 24.262vw;
					border-radius: 10upx;
					overflow: hidden;
					box-shadow: 0upx 5upx 20upx rgba(0, 0, 0, 0.3);

					image {
						width: 100%;
						height: 24.262vw;
					}
				}

				.list {
					margin-top: 40upx;
					width: 100%;
					display: flex;
					flex-wrap: wrap;

					.box {
						width: calc(61.44vw / 3);
						margin-bottom: 30upx;
						display: flex;
						justify-content: center;
						align-items: center;
						flex-wrap: wrap;

						image {
							width: 60%;
							border-radius: 10upx;
							height: calc(71.44vw / 3 * 0.6);
						}

						.text {
							margin-top: 5upx;
							width: 100%;
							text-align: center;
							font-size: 26upx;
							text-overflow: ellipsis;
							overflow: hidden;
							white-space: nowrap;
						}
					}
				}
			}
		}
	}
</style>
